﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Olympic_email_to_future.IBLL;
using Olympic_email_to_future.Module;
using Olympic_email_to_future.DALFactory;
using System.Timers;
using System.Net.Mail;
using System.Net;

namespace Olympic_email_to_future.BLL
{
    class UserBLL : IUserBLL
    {
        public static IDAL.IUserInfo dal = DALFactory.DataAccess.CreateUserDAL();

        public bool register(UserInfo user)
        {
            return dal.register(user);

        }

        public bool login(UserInfo user)
        {
            return dal.login(user);
        }

        public UserInfo getUser(UserInfo user)
        {
            return dal.getUser(user);
        }

        public void updateUser(UserInfo user)
        {
            dal.updateUser(user);
        }

        public void modify_password(UserInfo user)
        {
            dal.modify_password(user);
        }

        public bool checkPassword(UserInfo user)
        {
            return dal.checkPassword(user);
        }

        public bool add(UserInfo user)
        {
            return dal.add(user);
        }
        //后台
        public void update(int id, UserInfo user)
        {
            dal.update(id, user);
        }
        //后台
        public void delete(int id, UserInfo user)
        {
            dal.delete(id, user);
        }
        // 返回所有用户 ，用户后台管理
        public IList<UserInfo> getUsers()
        {
            return dal.getUsers();
        }
    }
}
